home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9867 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  48 lines

  1. Path: cats.ucsc.edu!nwaussie
  2. From: nwaussie@cats.ucsc.edu (Nicholas Cory Williams)
  3. Newsgroups: comp.os.ms-windows.programmer.misc,comp.lang.c
  4. Subject: Help needed using C's conio.h functions.
  5. Date: 14 Mar 1996 01:32:07 GMT
  6. Organization: University of California, Santa Cruz
  7. Message-ID: <4i7sun$49j@darkstar.UCSC.EDU>
  8. NNTP-Posting-Host: si.ucsc.edu
  9.  
  10.  
  11. I am trying to program a game that was origianlly going to be for DOS until
  12. I realised that my Turbo C/C++ compiler for Windows only compiled for windows.
  13. Now, I have to find a way of using basic text windows or something to output
  14. my text card game.
  15. I thought I had found the perfect solution when I found functions like
  16. cprintf and window and clrscr, etc. in the conio.h library however, they
  17. won't work.
  18.  
  19. #include<conio.h>
  20.  
  21. int main(void)
  22. {
  23.     clrscr();
  24.     window(10, 10, 20, 20);
  25.     cprintf("Hello world\r\n");
  26.     getch();
  27.     return 0;
  28. }
  29.  
  30. This program gives me these warnings and errors:
  31. Warning WINDOW.C 6: Call to function 'window' with no prototype in function
  32. main
  33. Warning WINDOW.C 7: Call to function 'cprintf' with no prototype in function
  34. main
  35. Linker Error: Undefined symbol _cprintf in module WINDOW.C
  36. Linker Error: Undefined symbol _window in module WINDOW.C
  37.  
  38. I think I have all my directories set up right, (all my other functions
  39. work fine with calls to other libraries).
  40.  
  41. Might this have something to do with me running all this under Win95? Is there
  42. something else I need to do to get these to work? I tried putting in
  43. prototypes for these functions but that only got rid of the warnings.
  44.  
  45. Please help me....
  46.  
  47. Nick.
  48.